<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:39:"./views/home/mobile/invite\weekly.phtml";i:1627629214;}*/ ?>
<!DOCTYPE HTML>
<html>
<head>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>接单排行</title>
    <link href="/static/home/mobile/css/reset_5.css" rel="stylesheet" type="text/css" />
    <link href="/static/home/mobile/css/style.css" rel="stylesheet" type="text/css" />
    <link href="/static/home/mobile/css/new_style.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/geren.css">
    <link rel="stylesheet" href="/static/home/mobile/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/home/mobile/css/facaeincon.css">
    <link rel="stylesheet" href="/static/plugins/dialog/css/dialog.css" />
    <script src="/static/home/mobile/js/jquery-2.0.3.min.js"></script>
    <script src="/static/plugins/dialog/js/dialog.js"></script>
    <script type="text/javascript" src="/static/plugins/clipboard.min.js"></script>
    <script type="text/javascript" src="/static/home/mobile/js/global.js"></script>
    <script src="/static/home/mobile/js/mui.min.js"></script>
        <script src="/static/home/mobile/js/jsbridge-mini.js"></script>
    <style type="text/css">
        body {
            font: 12px/20px "微软雅黑", "SimSun", "宋体", "Arial Narrow", HELVETICA;
            overflow-x: hidden;
            background: #F0F0F0;
            width: auto;
            height: 650px;
        }
        .button5, .button5:link, .button5:visited {
            width: 100%;
            height: auto;
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
            font-weight: normal;
            line-height: 35px;
            font-weight: bold;
            color: #fff;
            font-size: 17px;
            background: #FE4B1C;
            border: none;
            border-radius: 15px;
            display: block;
            margin: 10px 0;
            padding: 0;
            float: none;
        }
        .main-invite{
            margin-top: 50px;
        }
        .top{
             margin-top: -5px;
             margin-bottom: 10px;
             width: 100%;
             background: white;
        }
       .top .adv-img{
           margin: 0 auto;
           text-align: center;
       }
       .top .foru-click{
            background: white;
       }
       .foru-click .click-btn{
           width: 50%;
           height: 80px;
           float: left;
           text-align: center;
           padding: 0;
           border: 0;
           margin: 0 auto;
           background: white;
       }
        .top .foru-click .click-btn i{
            width: 20px;
            height: 20px;
            background-repeat: no-repeat;
            display: inline-block;
            background-position: center;
            background-size: 20px;
        }
        .top .foru-click .click-btn .share-icon{
          background-image: url("/static/home/mobile/images/share.png");
        }
        .top .foru-click .click-btn .code-erwei{
            background-image: url("/static/home/mobile/images/web-code.png");
        }
       .click-btn span{
           width: 100%;
           height: 20px;
           text-align: center;
           color: red;
           font-size: 2.2rem;
           font-weight: bold;
           clear: both;
       }
        .bottom_end{
            width: 100%;
            height: auto;
            margin-top: 10px;
            margin-bottom: 10px;
            clear: both;
            background: white;
        }
        span.title-invite{
            font-size: 18px;
            margin-top: 20px;
            margin-left: 5px;
            display: inline-block;
        }
        .bottom_end p{
            padding: 5px 2px 2px 5px;
            font-size: 1.2rem;
        }

        .alik{
            padding-top: 20px;
            width: 100%;
            display: inline-block;
            text-align: center;
        }
        .clearfix{
            clear: both;
        }
        .code{
            text-align: center;
            display: none;
            position: absolute;
            top: 0px;
            left: 0px;
            right: 0px;
            bottom: 0px;
            margin: auto;
            width: 200px;
            height: 230px;
            background: white;
            overflow: hidden;
            text-align: center;
            vertical-align: middle;
        }
        .code img{
            margin-top: 2px;
            width: 180px;
            height: 180px;
        }
        .code i{
            display: inline-block;
            width: 30px;
            height: 30px;
            background: url("/static/home/mobile/images/close_wind.png") top right no-repeat;
            text-align: right;
            outline: 0;
            filter: alpha(Opacity=70);
            opacity: .7;
            -webkit-transition: opacity .2s;
            -moz-transition: opacity .2s;
            -o-transition: opacity .2s;
            transition: opacity .2s;
            background-size: 80%;
            text-align: center;
        }
        .hiddenBlack{
            position: absolute;
            top: 0;
            left: 0;
            z-index: 9999;
            background-color: #000;
            filter: alpha(Opacity=80);
            opacity: .8;
            display: none;
            height:100%;
        }
        .saveimgbtn{
            left: 0;
            right: 0;
            bottom: 0;
            display: none;
            position: fixed;
            z-index:10000;
        }

table{
width: 100%;
    box-sizing: border-box;
    padding: 0px;

}
table tbody tr{
    display: flex;
    justify-content: space-between;
    align-items: center;

    background-color: #fff;
}
table tbody tr td,table tbody tr th{
   width: 25%;
   height: 2rem;
   line-height: 2rem;
   text-align: left;
}
table tbody tr th{
font-weight: bold;

}
table tbody tr td:nth-of-type(1),table tbody tr th:nth-of-type(1){
    padding:2px;
   text-align: left;
   width: 20%;
    font-size:12px;
}
table tbody tr td:nth-of-type(2),table tbody tr th:nth-of-type(2){
   text-align: center;
   width: 20%;
    font-size:12px;
}
table tbody tr td:nth-of-type(3),table tbody tr th:nth-of-type(3){
    padding:0px;
   text-align: center;
   width: 30%;
    font-size:12px;

}
table tbody tr td:nth-of-type(4),table tbody tr th:nth-of-type(4){
    padding:0px;
   text-align: center;
   width: 25%;
   color: #2F62FF;
    font-size:12px;

   padding-right: 0.9375rem;

}


  .person-list{
    width:100%;
    border-top:1px solid #f2f1f1;
    border-bottom:1px solid #f2f1f1;
	margin-top:10px;

  }
  .right-icon{
    background: url(/static/home/mobile/images/r.png) right 6px no-repeat;background-size:32px 32px;
  }
  
  .ul-table-new {
    width: 100%;
    margin: 0 auto;
}
.mui-table-view-cell>a:not(.mui-btn){line-height:26px;}
.mui-table-view {
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
    background-color: #fff;
}
.mui-ios .mui-table-view-cell {
    line-height: 22px;
    padding: 12px;
}
.mui-navigate-right::after {
    content: ''!important;
}

   .left-icon1{
    background-image: url(/static/home/mobile/images/RewardIcon.png) !important;
  }

     .left-icon2{
    background-image: url(/static/home/mobile/images/MytasksIcon.png) !important;
  }

     .left-icon3{
    background-image: url(/static/home/mobile/images/ReportIcon.png) !important;
  }

     .left-icon4{
    background-image: url(/static/home/mobile/images/Mymessageicon.png) !important;
  }

     .left-icon5{
    background-image: url(/static/home/mobile/images/RewardIcon.png) !important;
  }

  .left-icon6{
    background-image: url(/static/home/mobile/images/ContactusIcon.png) !important;
  }

  .left-icon7{
    background-image: url(/static/home/mobile/images/tutorialsIcon.png) !important;
  }
    .left-icon8{
    background-image: url(/static/home/mobile/images/FeedbackIcon.png) !important;
  }
    .left-icon6{
    background-image: url(/static/home/mobile/images/ContactusIcon.png) !important;
  }

.icon-source-list {
    width: 26px;
    height: 26px;
    display: inline-block;
    vertical-align: top;
    background-repeat: no-repeat;
    background-size: 26px;
    background-position: center;
}
.litter p{font-size:12px;}

.layui-layer-demo {
    height: 70%;
    overflow: scroll;
}

.layui-layer-demo .layui-layer-title {
    text-align: center;
    background: #fff;
    color: red;
    font-size: 16px;
    font-weight: bold;
    padding: 0px;
}
body{color:#e2e2e2;}
table tbody tr{background:#333;border-bottom:1px solid #444 !important;}
table tbody tr td:nth-of-type(4), table tbody tr th:nth-of-type(4){color:#2F62FF !important;}
    </style>
</head>

<body style="background:url('/static/home/mobile/images/star.jpg') 0% 0% / 100% no-repeat;background-color:#131313;">

    <div style="background:initial;color:#fff;"  class="site-header header-fixed">
        <a onclick="history.back()" class="back" style="background:none;margin-top:-10px;" >
            <img style="height:24px;" src='/static/home/mobile/images/return2.png'>
        </a>
        <div class="tit-name" style="color:#fff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;接单排行
               
                <span class="guize"  style="border-radius:5px;text-align:right;float:right;color:#fff;">排行规则</span>
            
        </div>

    </div>
    
    <div style="width:100%;color:#fff880;text-align:center;margin-top:170px;font-size:18px;">
    		活动时间：每周
    </div>
    
     <div style="width:100%;color:#fff;text-align:center;margin-top:10px;font-size:18px;">
    		每日完成任务，就有机会上榜
    </div>
    
    <div style="width:100%;color:#fff;text-align:center;margin-top:20px;font-size:18px;font-weight:bold;height:50px;line-height:50px;">
    		<div style="width:50%;margin-left:24%;float:left;border-radius:40px;background:#2F62FF;text-align:center;">
    			接单排行榜
    		</div>
    		<div style="float:right;text-align:right;padding-right:20px;" onclick="changeUrl()" id='bangdan'>
    			上期榜单
    		</div>
    		
    </div>



          
<div style="margin-left:5%;width:90%;margin-top:20px;background: #333;border-radius: 4px;padding:10px 0;font-weight: bold;font-size: 16px;margin-bottom:30px;" >
	<div   style="width:100%;margin-top:20px;">
		
    <div style="margin:0 auto;text-align:center;background:#2F62FF;width:80%;height:40px;line-height:40px;color:#fff;border-radius:40px;" >
       每周排行榜
    </div>

	</div>
    <div style="clear:both;"></div>
    

<div style="width:100%;margin-top:0px;border-top:1px solid #444;" class="down">

    <div style="width:100%;">
    <div style="padding:0 10px; position:relative;">

        <table class="weenrank"  id='this_month' >
        
       </table>
 
       <div  style="width:100%;height:50px;text-align: center;font-size: 18px;line-height: 50px;background: #333;margin-top: 20px;">
<div style="float:left;text-align:right;width:35%;" onclick="getUpPage()">
<svg t="1585965885214" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2088" width="26" height="26"><path d="M767.411612 130.775657 700.386529 63.852903 253.723194 510.516239 700.386529 957.179574 767.411612 890.25682 387.773359 510.516239Z" p-id="2089"></path></svg>
</div>
<div style="width:30%;float:left;font-size:12px;color:#bbb;line-height:36px;"> 
&nbsp;
</div>
<div style="float:left;text-align:left;width:35%;" onclick="getNextPage()">
<svg t="1585965972342" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1315" width="26" height="26"><path d="M633.361447 510.516239 253.723194 890.25682 320.748276 957.179574 767.411612 510.516239 320.748276 63.852903 253.723194 130.775657Z" p-id="1316"></path></svg>
</div> 

       </div>
          
        </div>

       <div id="this_week" style="padding-left:30px;width:100%;font-weight:initial;font-size:12px;"> 
       			<div style="font-size:14px;"><?php echo $member['nickname']; ?></div>
       		<div>	<span style="width:100px;display:inline-block;">接单数量：<i style="color:#2F62FF;"><?php echo (isset($member_task['count']) && ($member_task['count'] !== '')?$member_task['count']:'0'); ?></i></span> <span >任务金额：<i style="color:#2F62FF;"><?php echo (isset($member_task['total_price']) && ($member_task['total_price'] !== '')?$member_task['total_price']:'0'); ?></i></span>   </div>
       		<div>本周排名<i style="color:#2F62FF;">：
       		
       		    <?php if($is_reward): ?>
			        第<?php echo $is_reward['rank']; ?>名  
			    <?php else: ?>
			        暂未上榜，继续加油
			    <?php endif; ?>
       		
       		
       		</i></div>
       		
       		<div style='margin-top:10px;'>（排名数据每一小时更新）<span style="color:#2F62FF;" class="guize">查看排行榜规则>></span></spN></div>
       	
       </div>
       
       
       <div id="last_week" style="padding-left:30px;width:100%;font-weight:initial;font-size:12px;display:none;">
       			<div style="font-size:14px;"><?php echo $member['nickname']; ?></div>
       		<div>	<span style="width:100px;display:inline-block;">接单数量：<i style="color:#2F62FF;"><?php echo (isset($last_member_task['count']) && ($last_member_task['count'] !== '')?$last_member_task['count']:'0'); ?></i></span> <span >任务金额：<i style="color:#2F62FF;"><?php echo (isset($last_member_task['total_price']) && ($last_member_task['total_price'] !== '')?$last_member_task['total_price']:'0'); ?></i></span>   </div>
       		<div>本周排名<i style="color:#2F62FF;">：
       		
       		    <?php if($last_reward): ?>
			        第<?php echo $last_reward['task_weekly_id']; ?>名
			    <?php else: ?>
			        暂未上榜，继续加油
			    <?php endif; ?>
       		
       		
       		</i></div>
       		
       		<div style='margin-top:10px;'>（排名数据每一小时更新）<span style="color:blue;" class="guize">查看排行榜规则>></span></spN></div>
       	
       </div>
        
        
        
	<div   style="width:100%;margin-top:20px;margin-bottom:10px;" onclick="location.href='/home/task/index' ">
    <div style="margin:0 auto;text-align:center;background:#2F62FF;width:80%;height:40px;line-height:40px;color:#fff;border-radius:40px;" >
       每周排行榜
    </div>

	</div>        
        
       </div>
</div>    


    
    
    
    
</div >








 <script src="https://cdn.bootcss.com/layer/2.3/layer.js"></script>
<script>

    function set_type(){
        $('.down').toggle();
        $('.up').toggle();
    }
    


</script>


<script>
var page=0;


          


    $(".code i").click(function () {
        $("#code").hide();
        $(".van-overlay").hide();
    });
    $(".van-overlay").css("display","none");


    $(".click-btn").eq(3).click(function () {
        $(".van-overlay").show();
        $("#code").show();
    });
    $(".van-overlay").click(function () {
        $(this).hide();
        $("#code").hide();
    });
    function getBase64Image(img) {
        var canvas = document.createElement("canvas");
        canvas.width = img.width;
        canvas.height = img.height;
        var ctx = canvas.getContext("2d");
        ctx.drawImage(img, 0, 0, img.width, img.height);
        var dataURL = canvas.toDataURL("image/png");
        return dataURL
        // return dataURL.replace("data:image/png;base64,", "");
    }
    $("#code div").on({
        touchstart: function(e) {
            var x=0;
            // 长按事件触发
            timeOutEvent = setTimeout(function() {
                timeOutEvent = 0;


                $("#saveimgbtn").off("click").click(function(event){
                    event.stopPropagation();
                    lbuilder.Native.saveImage(base64, function(message){
                        alert("图片保存成功！");
                        // message('图片保存成功','','sucess');
                        $(".hiddenBlack").hide();
                        $(".saveimgbtn").hide();
                        $("#code").hide();
                        $(".van-overlay").hide();
                    }, function(err){
                        alert("图片保存失败！ "+err);
                    });
                });

                //saveimg(src);
            }, 800);
            //长按400毫秒
            //e.preventDefault();
        },
        touchmove: function() {
            //clearTimeout(timeOutEvent);
            //timeOutEvent = 0;
        },
        touchend: function() {
            clearTimeout(timeOutEvent);
            //return false;
        }
    });
    $(".hiddenBlack").on("click",function(){

        $(this).hide();
        $(".saveimgbtn").hide();
        $("#code").hide();
        $(".van-overlay").hide();

    });
    $("#saveimgcancel").on("click",function(){

        $(".hiddenBlack").hide();
        $(".saveimgbtn").hide();
        $("#code").hide();
        $(".van-overlay").hide();
    });

</script>
</style>

<script>
mui('.tophref').on('tap','a',function(){document.location.href=this.href;});
$(document).ready(function(){
$('.nav-footer a').each(function(){
if($($(this))[0].href==String(window.location))
$(this).addClass('mui-active');
});
})

function bh_msg_tips(msg) {
    var oMask = document.createElement("div");
    oMask.id = "bh_msg_lay";
    oMask.style.position = "fixed";
    oMask.style.left = "0";
    oMask.style.top = "50%";
    oMask.style.zIndex = "100";
    oMask.style.textAlign = "center";
    oMask.style.width = "100%";
    oMask.innerHTML = "<span style='background: rgba(0, 0, 0, 0.65);color: #fff;padding: 10px 15px;border-radius: 3px; font-size: 14px;'>" + msg
    + "</span>"; document.body.appendChild(oMask);
setTimeout(function () {
    $("#bh_msg_lay").remove();
}, 2000);
}
</script>
<script>
var this_url='/home/invite/weekly_ajax';
var last_url='/home/invite/last_weekly';
var url=this_url;
	
	function changeUrl(){
		if(url==this_url){
			url=last_url
			$('#bangdan').html('本期榜单')
			$("#this_week").show()
			$("#last_week").hide()
		}else{
			url=this_url;
			$('#bangdan').html('上期榜单')
			$("#this_week").hide()
			$("#last_week").show()
		}
		page=0;
		getNextPage();
	}
	
    function getNextPage(){
        if(page == 2){
            layer.msg('已到最后一页');
            return;
        }
        page=page+1
             Common.loading.show();
                $.post(
                    url,
                    {
                      page: page,
                    },
                    function (ret) {
             Common.loading.hide();
                        console.log(ret)
                        $("#this_month").html(ret)
                    },'json'
                );
    }
    getNextPage()
    function getUpPage(){
        if(page == 1){
            layer.msg('已到首页');
            return;
        }
        page=page-1
             Common.loading.show();
                $.post(
                    url,
                    {
                      page: page,
                    },
                    function (ret) {
             Common.loading.hide();
                        console.log(ret)
                        $("#this_month").html(ret)
                    },'json'
                );
    }

     function show_erweima(){
        $(".van-overlay").show();
        $("#code").show();
    }
    
    function share(val){

    	
    	if(val == 4){
    		jsBridge.setClipboardText("http://zz.99dybk.com/?i=<?php echo $member['uid']; ?>");
    		layer.msg('复制推广链接成功');
    		return;
    	}


   	jsBridge.share({
		    //分享到，0 微信朋友圈，1 微信好友，2 QQ好友，3 QQ空间；未指定则弹出分享菜单
		    to    : val,
		    //标题，未指定则为当前页面 title 标题
		    title : "加入闲猫，动动手指领现金！",
		    //链接，未指定则为当前页面链接
		    link  : "http://zz.99dybk.com/?i=<?php echo $member['uid']; ?>",
		    //图标，未指定则为 App 图标
		    imgUrl: "https://www.niurenzhuan.xyz/static/home/mobile/login/img3.jpg",
		    //描述，如未指定，App 会尝试抓取页面 meta description content，<meta name="description" content="页面描述..." />
		    //均无描述内容则显示链接
		    desc: "送你钱，不抢就没了！" 
		}, function(succ) {
		    if(succ){
		    	  $.post(
                    '/home/invite/share_reward',
                    {},
                    function (ret) {
            		
                      console.log(ret)
                    },'json'
                );
		    }
		    alert(succ ? "分享成功" : "分享失败或取消了分享");
		    
		});
    }
</script>

<script>
var content=`

        <div data-v-c04d7c44="" class="logs" style="background:#fff;border-radius:6px;margin:0 10%;width:80%;padding:0;">
          
                 <div data-v-c04d7c44="" class="mains" style="border-bottom-left-radius:6px;border-bottom-right-radius:6px;">
                        <div data-v-c04d7c44="" style="color:#000;text-indent: 20px;line-height: 26px;padding:10px;font-size: 14px;padding-top:10px;" class="more van-hairline--top">
						
						<p style="color:#2F62FF;font-weight:bold;">排行榜规则</p>
			
        <p>
               
              1、每周一至周日，0:00至24:00之前，做单总数。
            </p>
        <p>
           
            2、单数相同者按成交金额大小排行。
        </p>
         <p>
           
            3、排行榜奖励将在每周一发放。
        </p>
        <p>
      
           4.如果有违规，闲猫有权取消排行榜资格，并且收回收益,严重封号处理，排行榜活动权归闲猫所有。
       


                          </div>
                  </div>
          </div>


`


	     $('.guize').click(function () {
	     	
              layer.open({
                    type: 1,
                    title:'&nbsp;&nbsp;规则',
                    skin: 'layui-layer-demo', //样式类名
                    closeBtn: 0, //不显示关闭按钮
                    anim: 2,
                    shadeClose: true, //开启遮罩关闭
                    content:content
                  });
	     	
	     })
</script>
 </body>
</html>